home *** CD-ROM | disk | FTP | other *** search
/ MacWarehouse Macintosh Games / MacWarehouse Macintosh Games.iso / AMBER demo / ROXY / ROXY.dxr / 00648_SCRAP! KILL ME PLEASE!.ls < prev    next >
Encoding:
Text File  |  1996-10-18  |  2.9 KB  |  75 lines

  1. on XXXsetcurrentPageInBarManual suggestion
  2.   global oStoryteller, oPuppeteer
  3.   cursorOff()
  4.   set frameStack to getProp(the lsMultiFrames of oPuppeteer, #BarManual)
  5.   set pageList to [0, 1, 2, 3, 4, 5]
  6.   set currentPage to getState(oStoryteller, #currentPageInBarManual)
  7.   set bookMark to getPos(pageList, currentPage)
  8.   if suggestion = #next then
  9.     if bookMark = count(pageList) then
  10.       setState(oStoryteller, #playerIsReadingBarManual, 0)
  11.       updateDisplay(oPuppeteer)
  12.     else
  13.       set pageSprite to 0
  14.       set shadowSprite to 0
  15.       repeat with guess = 10 to 48
  16.         if getPos(frameStack, the castNum of sprite guess) then
  17.           set shadowSprite to guess
  18.           put "shadowSprite = " & guess
  19.           put "pageSprite = " & guess + 1
  20.           set pageSprite to guess + 1
  21.           exit repeat
  22.         end if
  23.       end repeat
  24.       set myLocation to the loc of sprite pageSprite
  25.       set the castNum of sprite shadowSprite to the castNum of sprite pageSprite
  26.       set the loc of sprite pageSprite to point(300, -300)
  27.       updateStage()
  28.       do("puppetTransition " & getProp(getProp(the lsMachineProfile of oPuppeteer, #transitions), #nextPage))
  29.       setProp(the lsStateData of oStoryteller, #currentPageInBarManual, list(getAt(pageList, bookMark + 1)))
  30.       set the castNum of sprite pageSprite to getAt(frameStack, bookMark + 3)
  31.       set the loc of sprite pageSprite to myLocation
  32.       updateStage()
  33.     end if
  34.   end if
  35.   if suggestion = #previous then
  36.     if bookMark = 1 then
  37.       setState(oStoryteller, #playerIsReadingBarManual, 0)
  38.       updateDisplay(oPuppeteer)
  39.     else
  40.       set pageSprite to 0
  41.       set shadowSprite to 0
  42.       repeat with guess = 10 to 48
  43.         if getPos(frameStack, the castNum of sprite guess) then
  44.           set shadowSprite to guess
  45.           set pageSprite to guess + 1
  46.           exit repeat
  47.         end if
  48.       end repeat
  49.       set myLocation to the loc of sprite pageSprite
  50.       set the castNum of sprite shadowSprite to the castNum of sprite pageSprite
  51.       set the loc of sprite pageSprite to point(300, -300)
  52.       updateStage()
  53.       do("puppetTransition " & getProp(getProp(the lsMachineProfile of oPuppeteer, #transitions), #prevPage))
  54.       setProp(the lsStateData of oStoryteller, #currentPageInBarManual, list(getAt(pageList, bookMark - 1)))
  55.       set the castNum of sprite pageSprite to getAt(frameStack, bookMark + 1)
  56.       set the loc of sprite pageSprite to myLocation
  57.       updateStage()
  58.     end if
  59.   end if
  60. end
  61.  
  62. on XXXsetplayerIsReadingBarManual suggestion
  63.   global oStoryteller, oPuppeteer
  64.   setProp(the lsStateData of oStoryteller, #currentPageInBarManual, [0])
  65.   setProp(the lsStateData of oStoryteller, #playerIsReadingBarManual, list(suggestion))
  66.   if suggestion = 1 then
  67.     set the inventoryStatus of oPuppeteer to #cool
  68.     set gFreezeInventory to 1
  69.     setTransition(oPuppeteer, #fadeIn)
  70.   else
  71.     set gFreezeInventory to 0
  72.     setTransition(oPuppeteer, #fadeIn)
  73.   end if
  74. end
  75.